<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
// let arr = [1, 2, 3, 4]
// let str = '123'
// let obj = { a: 1, b: 2 }
// console.log(arr)
// console.log(str)
// console.log(obj)
// for(let item of arr){
//   console.log(item);
// }
// for(let item of str){
//   console.log(item);
// }
// for(let item of obj){
//   console.log(item);
// }

// let iter = arr[Symbol.iterator]();
// console.log(iter.next());

let arr = [1, 2, 3, 4]
let iter = arr[Symbol.iterator]();
console.log(iter.next());
console.log(iter.next());
console.log(iter.next());
console.log(iter.next());
console.log(iter.next());

    </script>
  </body>
</html>
